home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
T-TPUG Old Monthly Disks
/
(c)t8.d64
/
lottery.c
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
2KB
|
72 lines
0 GOTO 160
1 "
2 "WRITTEN BY ROBERT K. SCHMID
3 "DECEMBER 4, 1983 FOR TPUG
4 "
5 POKE 53280,0:POKE 53281,0:PRINT""
6 CLR
7 TI$="000000"
8 GOTO 100
9 REM *** ENTER YOUR NUMBERS HERE ***
10 U=64
11 V=64
12 W=64
13 X=64
14 Y=64
15 Z=64
16 REM *******************************
20 M=INT(49*RND(1))
21 N=INT(49*RND(1))
22 O=INT(49*RND(1))
23 P=INT(49*RND(1))
24 Q=INT(49*RND(1))
25 R=INT(49*RND(1))
30 IF U=M AND V=N AND W=O AND X=P AND Y=Q AND Z=R THEN 50
31 C=C+1
32 GOTO 110
50 END
100 PRINT"[147]":PRINT" LOTTERY SIMULATION"
101 PRINT" [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]":PRINT
102 PRINT"H[146]OW MUCH MONEY HAVE I SPENT?"
103 PRINT"C[146]OMPUTER HAS BEEN RUNNING FOR?"
104 PRINT"Y[146]EARS I HAVE TRIED TO WIN?"
105 PRINT"G[146]IVE UP"
110 GET A$
115 IF A$="H" THEN 130
116 IF A$="C" THEN 140
117 IF A$="Y" THEN 150
118 IF A$="G" THEN 50
120 GOTO 20
121 FOR A=1 TO 2000:NEXT A
122 GOTO 100
130 PRINT:PRINT:PRINT C;"DOLLARS!"
131 FOR A=1 TO 2000:NEXT A
132 GOTO 100
140 PRINT:PRINT:PRINT LEFT$(TI$,2);" HOURS AND ";MID$(TI$,3,2);" MINUTES"
141 FOR A=1 TO 2000:NEXT A
142 GOTO 100
150 PRINT:PRINT
151 PRINT C/52;"YEARS!"
152 FOR A=1 TO 2000:NEXT A
153 GOTO 100
160 PRINT"[147] 6/49 LOTTERY SIMULATION"
161 PRINT:PRINTTAB(6)"WRITTEN BY ROBERT K. SCHMID"
162 PRINT:PRINT:PRINT
163 PRINT"THIS PROGRAM WILL ALLOW YOU TO ENTER"
164 PRINT"YOUR 'LUCKY' NUMBERS INTO THE COMPUTER."
165 PRINT"THE COMPUTER WILL THEN CHOOSE RANDOM"
166 PRINT"NUMBERS AND COMPARE IT TO YOUR TICKET"
167 PRINT"TO SEE IF YOU'VE WON THE 'JACKPOT' OF"
168 PRINT"ONE MILLION DOLLARS. CHOOSE SIX NUMBERS"
169 PRINT"WHOSE VALUES ARE BETWEEN 0 AND 49 AND"
170 PRINT"THEN ENTER THEM INTO LINES 10 THROUGH"
171 PRINT"15. THIS PROGRAM WAS MADE SO THAT PEOPLE";
172 PRINT"WHO PLAY LOTTERIES WILL HOPEFULLY LEARN"
173 PRINT"WHAT THEIR ODDS OF WINNING ARE."
174 PRINT"IF YOU DON'T PLAY LOTTERIES, WELL, THEN"
175 PRINT"YOU CAN LAUGH AT THE PEOPLE WHO DO!"
176 PRINT:PRINT" PRESS ANY KEY"
177 GET A$:IF A$="" THEN 177
178 PRINT:PRINT"ENTER YOUR VALUES AND THEN TYPE 'RUN 5'."
179 LIST 10-15